package com.team.app.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.team.app.dao.CompanyDao;
import com.team.app.model.Company;


@Service
public class CompanyServiceImpl implements CompanyService{
	@Autowired
    private CompanyDao companyDao;     

	@Override
	@Transactional
	public Long create(Company obj) {
		// TODO Auto-generated method stub
		return companyDao.create(obj);
	}

	@Override
	@Transactional
	public void edit(Company obj) {
		// TODO Auto-generated method stub
		companyDao.edit(obj);
	}

	@Override
	@Transactional
	public void remove(Company obj) {
		// TODO Auto-generated method stub
		companyDao.remove(obj);
	}

	@Override
	@Transactional
	public Company find(Object id) {
		// TODO Auto-generated method stub
		return companyDao.find(id);
	}

	@Override
	@Transactional
	public List<Company> findAll() {
		// TODO Auto-generated method stub
		return companyDao.findAll();
	}

	@Override
	@Transactional
	public List<Company> findRange(int[] range) {
		// TODO Auto-generated method stub
		return companyDao.findRange(range);
	}

	@Override
	@Transactional
	public Long count() {
		// TODO Auto-generated method stub
		return companyDao.count();
	}

	@Override
	@Transactional
	public List<Company> findAll(Company obj) {
		// TODO Auto-generated method stub
		return companyDao.findAll(obj);
	}

	@Override
	@Transactional
	public boolean existEmail(String email) {
		// TODO Auto-generated method stub
		return companyDao.existEmail(email);
	}

	
}
